#ifndef COMMUNICATION_DEVICE_SNIFFING_HEAD
#define COMMUNICATION_DEVICE_SNIFFING_HEAD

#include "communication-device.h"
#include "smart-device-manager.h"
#include <map>
/**
 * 门锁社保类
*/
class CommunicationDeviceSniffing : public CommunicationDevice
{
public:
	CommunicationDeviceSniffing(SmartDeviceManager *manager);
	void communication(SmartDevicenetProtocol &netProtocol, NetCommunication *netObj);
	void query(SmartDevicenetProtocol &netProtocol, NetCommunication *netObj);
	void replay(NetCommunication *netObj, const string &command, const string &errmsg = "", const string &data = "");

private:
	SmartDeviceManager *smartDeviceManager;
	typedef void (CommunicationDeviceSniffing::*funcation_t)(SmartDevicenetProtocol &, NetCommunication *);
	map<string, funcation_t> handle;
};
#endif
